﻿<%@ Page Title="飞扬四方-免费资料" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ReferenceBook.aspx.cs" Inherits="ReferenceBook" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

<%--<script language="javascript" type="text/javascript"  src="ReferenceBook.js"></script>
--%>    <!--

Title Under Menu

--><body id="ReferenceBook">
    <div id="pagetitle">
        免费资料</div>
    <!--

CONTENT CONTAINER

-->
    <div id="content-top-three-column">
    </div>
    <div id="content-container-three-column">
        <div id="content-side1-three-column">
            <ul class="list-of-links">
                <li class="current"><a href="ReferenceBook.aspx"><h5>所有资料</h5></a></li>
                <li class="current"><a href="download.aspx"><h5>资料下载</h5></a></li>
                 <li class="current"><a href="Default.aspx"><h5>首页</h5></a></li>
            </ul>
        </div>
     <div>
     <div>
        <p>友情提示：需要什么资料，请留下您的e-mail地址和需求，我们免费为您提供！</p> 
         电子邮箱：<asp:TextBox ID="txtemail" runat="server" MaxLength="50"></asp:TextBox>
         需求资料：<asp:TextBox ID="txtyaoqiu" runat="server"></asp:TextBox>  
         
         <asp:Button ID="tijiao" runat="server" Text="提交" OnClick="tijiaoclick" OnClientClick="Required()";/>
         <asp:Button ID="quxiao" runat="server" Text="取消" OnClick="quxiaoclick"/>
         <br />
         <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
             ControlToValidate="txtemail" ErrorMessage="Email格式不正确" 
             ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
             Display="Dynamic"></asp:RegularExpressionValidator>
         <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
             ControlToValidate="txtemail" ErrorMessage="电子邮件不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
             ControlToValidate="txtyaoqiu" ErrorMessage="需求资料不能为空" Display="Dynamic"></asp:RequiredFieldValidator>
      </div></div>
        <!--

  CENTER COLUMN

  -->
        <div id="content-main-three-column">
            <h1>
                最新资料</h1>
            <hr />
            <!-- END MAIN COLUMN -->
            <asp:Panel ID="AllBooksPanel" runat="server">
                <%--Data Source Controls--%>
                <asp:ObjectDataSource ID="ObjectDataSourceAllBooks" runat="server" SelectMethod="GetAllBooks"
                    TypeName="books"></asp:ObjectDataSource>
                <asp:GridView ID="GridViewAllBooks" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSourceAllBooks"
                    AllowPaging="True" PageSize="5" OnRowCreated="GridViewAllBooks_RowCreated" BorderWidth="0"
                    BorderColor="#E5ECF9" DataKeyNames="bookId" GridLines="None">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <div class="photo-shadow">
                                    <asp:Image ID="Image2" runat="server" ImageUrl='<%# "images/" + (string)Eval("bImageUrl") %>'
                                        Width="160" Height="120" CssClass="photo-border photo-float-left" /></div>
                                <h2>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "ReferenceBook.aspx?booksId=" + (string)Eval("bookId") %>'> 
                                    <%# Eval("bName").ToString()%>
                                    </asp:HyperLink>
                                </h2>
                                <p class="news-date">
                                    <%# Eval("bDate").ToString()%>
                                </p>
                                <p>
                                    <%# Eval("bContent").ToString().PadRight(256,' ').Substring(0, 256) %>
                                </p>
                                <asp:HyperLink ID="HyperLink5" runat="server" ImageUrl="images/arrow.gif" NavigateUrl='<%# "ReferenceBook.aspx?booksId=" + (string)Eval("bookId") %>' />
                                <asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl='<%# "ReferenceBook.aspx?booksId=" + (string)Eval("bookId") %>'> 
                                   更多
                                </asp:HyperLink>
                                <hr />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerSettings Mode="NumericFirstLast" Position="TopAndBottom" />
                </asp:GridView>
            </asp:Panel>
            <asp:Panel ID="BooksDetailPanel" runat="server" Visible="false">
                <asp:ObjectDataSource ID="ObjectDataSourceBooksDetails" runat="server" SelectMethod="GetBooksItem"
                    TypeName="books">
                    <SelectParameters>
                        <asp:QueryStringParameter Name="booksItemId" QueryStringField="booksId" Type="string"
                            DefaultValue="" />
                    </SelectParameters>
                </asp:ObjectDataSource>
                <asp:DetailsView ID="DetailsViewBooks" runat="server" AutoGenerateRows="false" AllowPaging="false"
                    BorderWidth="0" BorderColor="#E5ECF9" DataSourceID="ObjectDataSourceBooksDetails">
                    <Fields>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:Image ID="Image2" runat="server" ImageUrl='<%# "images/" + (string)Eval("bImageUrl") %>'
                                    Width="160" Height="120" CssClass="photo-border photo-float-left" />
                                <h2>
                                    <%# Eval("bName").ToString()%>
                                </h2>
                                <p class="news-date">
                                    <%# Eval("bDate").ToString()%>
                                </p>
                                <p>
                                    <%# Eval("bContent").ToString()%>
                                </p>
                                <hr />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Fields>
                </asp:DetailsView>
                <a href="ReferenceBook.aspx">返回所有资料</a><img
                    src="images/arrow.gif" alt="" />
            </asp:Panel>
        </div>
        <!--

  CONTENT SIDE 2 COLUMN

  -->
        
        <div class="clear">
        </div>
    </div>
    <div id="content-bottom-three-column">
    </div></body>
</asp:Content>
